<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<title>首页</title>
		<%@include file="/WEB-INF/base.jspf"%>
		<script type="text/javascript" src="/js/jqthumb.js"></script>
		<script src="/js/font_595888_1jlcfz62jg8vkj4i.js"></script>
		<style>
			.body .aaa li{display: block;width: 20%;float: left;}
			.body .aaa li a{font-size:12px ;display: block;}
			.body .aaa li a img{height: 60px;width: 60px;}
			.fl{margin: 0 5px;}
			#zjxx tr *{font-size: 14px;}
			#zjxx tr td:nth-child(1){padding-left: 10px;}
			#zjxx tr td:nth-child(2) span{color: red;}
			  .icon {
			     width: 1em; height: 1em;
			     vertical-align: -0.15em;
			     fill: currentColor;
			     overflow: hidden;
			  }			
			#cai li{float: left;width: 33.3%;border-right:1px solid #E7E1E1;border-top:1px solid #E7E1E1;padding: 10px 0;height:100px;}
			.removeBr{border-right:1px solid white!important;}
			.bb{border-bottom:1px solid #E7E1E1;}
			#cai img{height:50px;}
			.modal-dialog {
				top:20%;
			}
			.div-c-chooseChatWrapper, .div-c-chooseChatWrapper > div {
				display:flex;
				align-items:center;
			}
			.div-c-chooseChatWrapper > div > span {
				margin-left:16px;
			}
			.modal-body .div-c-chooseChatWrapper + .div-c-chooseChatWrapper {
				border-top:1px solid #cecece;
			}
			.div-c-chooseChatWrapper {
				justify-content:space-between;
				padding:2vh;
			}
			.div-c-chooseChatWrapper svg {
				width:6vh;
				height:6vh;
				max-width:40px;
				max-height:40px;
			}
			.span-pointMoney {
				color:red!important;
				font-weight: bold;
				font-size:13px!important;
			}
			#span-i-websiteTitle {
				white-space: nowrap;
			}
			#cai li.cz, .div-c-chooseChatWrapper {
				cursor: pointer;
			}
			#table-i-lotterInfo td {
				text-align: left;
			}
			.modal {
				position: absolute;
			}
			body {
				padding-right:0!important;
			}
		    *.modal-open {  
			    overflow-y: auto;  
			    padding-right: 0 !important;  
			}  			
			.b1white {
				cursor: pointer;
			}
		</style>
	</head>
	<body>
	<div id="loading" class="kd-loading">
	<div class="kd-spinner">
		<span class="bounce b1"></span>
		<span class="bounce b2"></span>
		<span class="bounce b3"></span>
	</div>
	<p>&nbsp;</p>
	<p>&nbsp;</p>
	<p>请稍等，努力加载中...</p>
</div>
<div class='wapper' style="display:none">
	<div class="main clearfix">
		<div class="bg-theme col-xs-12 col-sm-4 col-sm-offset-4 text-center top" style="height: 70px;padding:0;position: fixed;">
			<div style="height: 50px;position: relative;">
				<c:choose>
					<c:when test="${sessionScope.user.id==null }">
						<a href="register.jsp" class="fl" style="margin-left: 10px;"><span>注册</span></a>
						<a href="login.jsp" class="fr" style="margin-right: 10px;"><span>登录</span></a>
					</c:when>
					<c:otherwise>
						<img src="/d/cp/${user.avatar }" class="fl b1white br3" style="width: 30px;height: 30px; margin: 10px;" />
						<span id="span-i-websiteTitle" style="position: absolute;top: 50%;left:50%;transform:translateX(-50%) translateY(-50%);"></span>
					</c:otherwise>
				</c:choose>
			</div>
			<div id="noticeWrapper" style="height: 30px;background: white;overflow:hidden;width:100%;position: relative;">
				<span style="font-size: 20px;background: white;z-index: 100;position:absolute;top: 50%;left:0px; padding: 0 5px;transform:translateY(-50%);display:inline-flex;align-items:center;"><span style="font-size:12px;color: #059BF3;margin-right:6px;">公告</span><span class="speak glyphicon glyphicon-volume-up" style="color: #059BF3;top:0px;"></span></span>
				<!-- <nobr id="test1" style="position: fixed;margin-left: 100%;left: 0px;z-index:90;margin-top: -5px;"> -->
				<span id="span-i-webSiteNoticeScroll" style="white-space:nowrap;margin-left: 40px;font-size: 13px;color: #059BF3;display:inline-block;position: relative;bottom:10px;transform:translateX(100%);"></span>
				<!-- </nobr> -->
			</div>
		</div>
		
	<div class="col-xs-12 col-sm-4 col-sm-offset-4 text-center body clearfix" style="padding: 0;">
		<div id="myCarousel" class="carousel slide" style="margin:0px ;margin-top:80px;">
		    <ol class="carousel-indicators">
		    </ol>   
		    <div class="carousel-inner">
		    </div>
		    <a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
		    <a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>
		</div>
		<!-- 正文开始 -->
		<ul class="aaa clearfix" style="width: 100%; margin-top: 10px;">
			<li style="cursor: pointer;"><a class="color-theme" href="/pay/payAndGetCash.do"> <img
					src="/img/first/chongzhitixian.png" /><br>充值/提款
			</a></li>
			<li><a class="color-theme" href="/u/luckys.do"> <img
					src="/img/first/xyzp.png" /><br>幸运转盘
			</a></li>
			<li><a class="color-theme" href="/youhuihd.do" id="a-i-youhuiHref"> <img
					src="/img/first/yhhd.png" /><br>优惠活动
			</a></li>			
			<li><a class="color-theme" href="/chat/chatAll.do"> <img
					src="/img/first/youhuihuodong.png" /><br>在线交流
			</a></li>
			<li><a class="color-theme" href="javascript:;" id="a-i-chooseKeFuType"> <img
					src="/img/first/zaixiankefu.png" /><br>联系客服
			</a></li>
		</ul>
		<!-- 正文结束 -->
		<div id="cai" class="clearfix" style="width: 100%;"> 
			<div style="text-align: left;">
				<span class="glyphicon glyphicon-fire" style="color: red;"></span>
				<strong> 热门彩种</strong>
			</div>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==31 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==6 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==2 }">
					<li class='${l.classt } cz${i.index+1 }' href='lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==19 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==7 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==3 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==5 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==28 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==13 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==12 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==8 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==9 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==15 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<c:forEach items="${lotterList }" var="l" varStatus="i" >
				<c:if test="${l.id==17 }">
					<li class='${l.classt } cz${i.index+1 }' href='/lotter/lot.do?zl=${l.cname }'>
						<img src='/img/caizhong/${l.img }.png' /><br class='br'>
						<span class='name'>${l.name }</span>
					</li>
				</c:if>
			</c:forEach>
			<li class='' href=''>
				<a href="${url }" target="blank">
					<img src='/img/caizhong/download.png' style="width:60px;height:60px;" /><br class='br'>
					<span class='name'>APP下载</span>
				</a>
			</li>
			<li class='' href='gc.do'>
				<img src='/img/caizhong/more.png' style="width:60px;height:60px;" /><br class='br'>
				<span class='name'>更多游戏</span>
			</li>
		</div>
	</div>
	
	<div class="col-xs-12 col-sm-4 col-sm-offset-4 div-c-lotterInfoWrapper" id="zjxx" style="z-index: -10;height: 200px;overflow: hidden;">
		<table id="table-i-lotterInfo" style="touch-action: pan-y; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);width: 100%;margin-top: -10px;">
		<tbody></tbody>
		</table>
	</div>
	<div class="col-xs-12 col-sm-4 col-sm-offset-4 foot" style="position: fixed;"><iframe src="f.jsp"></iframe></div>
<!-- 	<div class="div-c-noticeContentDiv">
		<div class="noticeContentInner">
			<div style="background-color:#059BF3;"><span>公告</span>
				<div class="div-c-svgWrapper">
          			<svg class="icon" aria-hidden="true" style="fill:white">
			  	  <use xlink:href="#icon-14CIRCLE"></use>
				</svg>
				</div>			
			</div>
			<h1 style="font-size:16px;padding-top:1vh;text-align:center;font-weight:bold;" id="h1-i-noticeTitle"></h1>
			<img src="" id="img-i-noticeImg" />
			<p style="text-align: center;padding:1vh 0;color:#059BF3;" id="p-i-noticeContent"></p>
		</div>
	</div> -->
	
	</div>
	<!-- 模态框（Modal） -->
<div class="modal fade" id="kefuModal" role="dialog" aria-labelledby="kefuModal" aria-hidden="true">
    <div class="modal-dialog" style="max-width:400px;">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" style="text-align: center;" id="myModalLabel">选择客服类型</h4>
            </div>
            <div class="modal-body" style="padding-bottom:0;">
            	<div class="div-c-chooseChatWrapper" data-type="kefu">
            		<div>
            			<svg class="icon" aria-hidden="true" style="fill: #059BF3;">
					  	  <use xlink:href="#icon-kefu"></use>
						</svg>
						<span>在线客服</span>
            		</div>
             			<svg class="icon" aria-hidden="true" style="fill: #059BF3;">
					  	  <use xlink:href="#icon-1202youjiantou"></use>
						</svg>           		
            	</div>
            </div>
            <div class="modal-footer" style="text-align: center;border-top:none;">
                <button type="button" class="btn btn-default" style="width:70%;" data-dismiss="modal">关闭</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>	

<div class="modal-div-fakeModal" id="div-i-noticeGenDan">
	<div class="div-c-modalContent">
		<h3 class="fakemodal-title"></h3>
		<div class="fakemodal-content"></div>
		<div class="fakemodal-btnsGroup"><button class="btn btn-default btn-class-closeFakeModal">关闭</button></div>
	</div>
</div>		
	</div>
	</body>
	<script>
/* 	<div class="div-c-chooseChatWrapper" data-type="qq">
	<div>
			<svg class="icon" aria-hidden="true" style="fill:rgb(75,134,238)">
	  	  <use xlink:href="#icon-unie652"></use>
		</svg>           		
		<span>QQ客服</span>
	</div>
     	<svg class="icon" aria-hidden="true" style="fill:rgb(75,134,238)">
	  	  <use xlink:href="#icon-1202youjiantou"></use>
		</svg>    
</div> */
$(".b1white").on(getEndClickEvent(), function(e) {
	window.location.href ="/u/editUserSelfData.do"
})
var titleObj = {}
var nowTime

function createQQChatItem(item, index) {
	var html =
		"<div class='div-c-chooseChatWrapper' data-qqnum='" + item.number + "' data-type='qq'>"+
			"<div>"+
					"<svg class='icon' aria-hidden='true' style='fill:rgb(253,107,84);'>"+
			  	  "<use xlink:href='#icon-social-qq'></use>"+
				"</svg>"+           		
				"<span>客服-" + item.note + "</span>"+
			"</div>"+
		     	"<svg class='icon' aria-hidden='true' style='fill:rgb(253,107,84);'>"+
			  	  "<use xlink:href='#icon-1202youjiantou'></use>"+
				"</svg>"+    
		"</div>"		
	return html
}

ajax({
	url: "/sy.do",
	type: "post",
	data: {},
	success: function(data) {
		if (data.indexOf("<!DOCTYPE html>") != -1) {
			return
		}
		var newData = JSON.parse(data)
	},
	error: function(status) {
		showNormalNoticeModal("#div-i-noticeGenDan", "提示：", "网络繁忙")
	}
}) 


ajax({
	url:"/kfurl.do",
	type: "post",
	data: {},
	success: function(data) {
		if (data.indexOf("<!DOCTYPE html>") != -1) {
			return
		}
		var newData = JSON.parse(data)
		var len = newData.data.length > 3 ? 3: newData.data.length
		for (var i = 0; i < len; i++) {
			var item = newData.data[i]
			$("#kefuModal .modal-body").append(createQQChatItem(item, i + 1))
		}
	},
	error: function(status) {
		showNormalNoticeModal("#div-i-noticeGenDan", "提示：", "网络繁忙")
	}
})

var baseUrl = "/"

var isLogin = "${sessionScope.user.id}"
if (isLogin == "") {
	ajax({
		url: "/indexNotice.do",
		type: "post",
		data: {"type": "首页公告"},
		success: function(data) {
			var newData = JSON.parse(data)
			if (newData.data === null && newData.data.noticeState === 0) {
				return
			}
			showAlertNotice(newData.data.noticeName, newData.data.noticePicture, "")
		},
		error: function(status) {
			showNormalNoticeModal("#div-i-noticeGenDan", "提示：", "网络繁忙")
		}
	})	
/* 	$("#img-i-noticeImg").on("load", function(event) {
		$(".div-c-noticeContentDiv").addClass("div-c-noticeContentDiv-active")
		if (isMobile()) {
			 $(".main").addClass("body-active")	
		}
		$(".div-c-svgWrapper").on(getEndClickEvent(), function(event) {
			$(".div-c-noticeContentDiv").removeClass("div-c-noticeContentDiv-active")
			setTimeout(function() {
				$(".div-c-noticeContentDiv").css("display", "none")
				$(".main").removeClass("body-active")
			}, 300)
		})
	})		 */
}

ajax({
	url:"/indexPicture.do",
	type: "post",
	data: {},
	success: function(data) {
		var newData = JSON.parse(data)
		var picObj = newData.data
		for (var i = 1; i < 6; i++) {
			var picItem = picObj["picturePath" + i]
			if (picItem == "") {
				continue
			}
			var childNum = $("#myCarousel .carousel-indicators").find("li").length
			$("#myCarousel .carousel-indicators").append("<li data-target='#myCarousel' data-slide-to='" + childNum + "'></li>")
			$("#myCarousel .carousel-inner").append("<div class='item'><img src='/d/cp/" + picItem + "'></div>")
		}
		$("#myCarousel .carousel-indicators").find("li").eq(0).addClass("active")
		$("#myCarousel .carousel-inner").find("div").eq(0).addClass("active")
		$("#myCarousel").carousel('cycle')
/* 		var len = newData.data.length > 3 ? 3: newData.data.length
		for (var i = 0; i < len; i++) {
			var item = newData.data[i]
			$("#kefuModal .modal-body").append(createQQChatItem(item, i + 1))
		} */
	},
	error: function(status) {
		showNormalNoticeModal("#div-i-noticeGenDan", "提示：", "网络繁忙")
	}
})

 		var setVipGetMoneyNotice = function() {
		 	var urlPath = "/laba.do"
				var newRequest = {
					url: urlPath,
					type: "post",
					data: {},
					success: function(data) {
						if (data.indexOf("<!DOCTYPE html>") != -1) {
							return
						}
						var newData = JSON.parse(data)
						for (var i = 0; i < newData.data.length; i++) {
							var item = newData.data[i]
							//用户wch  fukuanje tikuanje 元
							var type = ""
							var numValue = 0
							var time = item.cltime.split(" ")[1]
							if (item.fukuanje == 0) {
								type = "提现"
								numValue = item.tikuanje
							} else {
								type = "充值"
								numValue = item.fukuanje								
							}
							var html = "<tr><td>" + item.name.slice(0, item.name.length - 1) + "*" + "</td><td>在" + time + "时</td><td>" + type + "<span class='span-pointMoney'>" + numValue + "</span>元</span></td></tr>"
							$("#table-i-lotterInfo tbody").append(html)
						}
						window.setInterval(function() {
							var x = Number($("#zjxx table").css("margin-top").replace("px", ""));
							if (x < -Number($("#zjxx table").css("width").replace("px", ""))) {
								$("#zjxx table").css("margin-top", "0px");
							} else {
								$("#zjxx table").css("margin-top", (x - 1) + "px");
							}
						}, 30)								
					},
					error: function(status) {
						console.log("status", status)
					}
				}
				ajax(newRequest)			
		}	
	var setTableData = function() {
		 	var urlPath = "/order/zjdata.do"
				var newRequest = {
					url: urlPath,
					type: "post",
					data: {},
					success: function(data) {
						if (data.indexOf("<!DOCTYPE html>") != -1) {
							$("#table-i-lotterInfo tbody").append(html)
							$(".div-c-lotterInfoWrapper").css("height", "50px")
							return
						}						
						var newData = JSON.parse(data)
						for (var i = 0; i < newData.data.length; i++) {
							var item = newData.data[i]
							var zhanghao = item.huiyuanzh.slice(0, item.huiyuanzh.length - 1) + "*"
							var html = "<tr><td>" + zhanghao + "</td><td><span>喜中" + item.goalmoney + "元</span></td><td>购买" + item.cname1 + "</td></tr>"
							$("#table-i-lotterInfo tbody").append(html)
						}
						setVipGetMoneyNotice()
					},
					error: function(status) {
						console.log("status", status)
					}
				}
				ajax(newRequest)			
		}
		setTableData() 
		var setMainTitle = function() {
		 	var urlPath = "/title.do"
			var newRequest = {
				url: urlPath,
				type: "post",
				data: {},
				success: function(data) {
					if (data.indexOf("<!DOCTYPE html>") != -1) {
						return
					}
					var newData = JSON.parse(data)
					titleObj = newData.data
					nowTime = newData.message
					$("#span-i-websiteTitle").text(newData.data.wangzhantitle)	
					$("#span-i-webSiteNoticeScroll").text(newData.data.notice)
					//$("#span-i-websiteTitle").text("大发国际彩票")
				},
				error: function(status) {
					console.log("status", status)
				}
			}
			ajax(newRequest)			
		}
		$("#cai li").click(function(){
			var href=$(this).attr("href");
			if(href.indexOf("zl=zc")!=-1){
				window.location.href="/lotter/footballMatch.do";
			}else{
				if(href!=""){
					window.location.href=href;
				}
			}
			
		});
		$("#cai li:gt(8)").addClass("bb")
		$("#cai li:nth-child(3n+4)").addClass("removeBr")
		function jump(url) {
			window.location.href = "/lotter/lot.do?zl=" + url;
		}
		window.setInterval(
			function() {
				if ($(".speak").attr("class").indexOf(
						"glyphicon-volume-down") == -1)
					$(".speak").removeClass("glyphicon-volume-up")
							.addClass("glyphicon-volume-down");
				else
					$(".speak").removeClass("glyphicon-volume-down")
							.addClass("glyphicon-volume-up");
			}, 300)

		setMainTitle()
		$("#a-i-chooseKeFuType").on(getEndClickEvent(), function() {
			$("#kefuModal").modal("show")	
		})
		$("#kefuModal").on(getEndClickEvent(), ".div-c-chooseChatWrapper", function(event) {
			var self = event.currentTarget
			var qqNum = self.dataset.qqnum
			if (self.dataset.type == "qq") {
				if (window.ontouchend === null) {
					location.href = "mqqwpa://im/chat?chat_type=wpa&uin=" + qqNum + "&version=1&src_type=web&web_src=oicqzone.com"
				}
				else if (window.ontouchend === undefined) {
					location.href = "http://wpa.qq.com/msgrd?v=3&uin=" + qqNum + "&site=qq&menu=yes"
				}
			} else {
				if (isLogin == "") {
					showNormalNoticeModal("#div-i-noticeGenDan", "提示：", "需登录后才可连线客服")
					return
				}
				var shangbanTimeHour = Number(titleObj.kefusbtime.slice(0, 2))
				var shangbanTimeMin = Number(titleObj.kefusbtime.slice(2, 4))
				var xiabanTimeHour = Number(titleObj.kefuxbtime.slice(0, 2))
				var xiabanTimeMin = Number(titleObj.kefuxbtime.slice(2, 4))
				var nowHour = new Date(nowTime).getHours()
				var nowMin = new Date(nowTime).getMinutes()
				if (nowHour < shangbanTimeHour || nowHour > xiabanTimeHour) {
					showNormalNoticeModal("#div-i-noticeGenDan", "提示：", "非客服工作时间，客服工作时间为" + kefusbtime.slice(0, 2) + ":" + kefusbtime.slice(2, 4) + "~" + kefuxbtime.slice(0, 2) + ":" + kefuxbtime.slice(2, 4))
					return
				}
				if (nowHour === shangbanTimeHour && nowMin < shangbanTimeMin) {
					showNormalNoticeModal("#div-i-noticeGenDan", "提示：", "非客服工作时间，客服工作时间为" + kefusbtime.slice(0, 2) + ":" + kefusbtime.slice(2, 4) + "~" + kefuxbtime.slice(0, 2) + ":" + kefuxbtime.slice(2, 4))
					return					
				}
				if (nowHour === xiabanTimeHour && nowMin > xiabanTimeMin) {
					showNormalNoticeModal("#div-i-noticeGenDan", "提示：", "非客服工作时间，客服工作时间为" + kefusbtime.slice(0, 2) + ":" + kefusbtime.slice(2, 4) + "~" + kefuxbtime.slice(0, 2) + ":" + kefuxbtime.slice(2, 4))
					return					
				}				
				location.href = "/chat/kefu.do"
			}
		})
		
		
		var allWidth = document.querySelector("#noticeWrapper").clientWidth - 60
		var i = allWidth
		window.setInterval(function() {
			$("#span-i-webSiteNoticeScroll").css({
				"transform": "translateX(" + i + "px)"
			})
			i--
			if (Math.abs(i) == allWidth) {
				i = allWidth
			}
		}, 20)
		
		
window.onload=function () {  
        document.addEventListener('touchstart',function (event) {  
            if(event.touches.length>1){  
                event.preventDefault();  
            }  
        })  
        var lastTouchEnd=0;  
        document.addEventListener('touchend',function (event) {  
            var now=(new Date()).getTime();  
            if(now-lastTouchEnd<=300){  
                event.preventDefault();  
            }  
            lastTouchEnd=now;  
        },false)  
    }
		
		// <span style="margin-left: 40px;font-size: 13px;color: #059BF3;">${admin.notice }　</span>
/* 		$("#a-i-youhuiHref").on(getEndClickEvent(), function(e) {
			showNormalNoticeModal("#div-i-noticeGenDan", "提示：", "暂无优惠活动")
			e.preventDefault()
		}) */
	</script>
</html>
